home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Games of Daze
/
Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso
/
x2ftp
/
msdos
/
source
/
swagg-m
/
memory.swg
/
0006_FREEMEM1.PAS.pas
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Pascal/Delphi Source File
|
1993-05-28
|
390 b
|
19 lines
{
Does anyone have any routines to find the available memory outside of the
heap ?
}
Function GetFreeMemory : LongInt;
Var
Regs : Registers;
begin
Regs.AH := $48;
Regs.BX := $FFFF;
Intr($21,Regs);
GetFreeMemory := LongInt(Regs.BX)*16;
end;
{
This Procedure tries to allocate 1MB memory (what's impossible).
Dos will give you the maximum of free memory back.
}